fix(live-proof): isolate exact event proof execution - #1221
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs changes before merge. Reviewed August 21, 2026, 4:08 PM ET / 20:08 UTC. ClawSweeper reviewWhat this changesThe PR splits exact-event review, untrusted live-proof execution, and trusted publication into artifact-bound GitHub Actions jobs. Merge readiness⛔ Blocked by patch quality or review findings - 7 items remain This PR remains necessary because current main still runs exact live proof in the review job, but the proposed isolation is incomplete: PR-head code can recover the outer step shell’s runner variables through Priority: P1 Review scores
Verification
How this fits togetherClawSweeper generates an exact review record, optionally executes its live-proof plan, then publishes the durable result and completes the queue lease. This PR moves proof execution to a separate job and passes only a bound proof augmentation to a fresh trusted finalizer. flowchart LR
A[Exact event request] --> B[Review and core bundle]
B --> C[Live-proof job]
C --> D[Proof augmentation]
B --> E[Trusted finalizer]
D --> E
E --> F[Durable report and queue completion]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The current head safely validates the augmentation archive, but its live-proof process can still recover sensitive parent-shell state. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Create a one-way execution boundary that prevents target code from reading or writing workflow command files or influencing later actions, then preserve the safe artifact parser and update proof for the current head. Do we have a high-confidence way to reproduce the issue? Yes, from source: on the Linux hosted runner, same-user PR code can walk its process ancestry through Is this the best way to solve the issue? No. The three-job design and archive validation are sound directions, but Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eb8e2caabeb2. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing as superseded by #1280. Current main retired automatic live-proof generation and target execution; Thank you for identifying the isolation problem and developing the separation. We are keeping the simpler ownership boundary rather than reviving that execution lane. |
What Problem This Solves
Fixes an issue where an exact event review that recommends live proof would execute untrusted pull-request code in the credentialed review job, and where target-created restrictive scratch paths could make cleanup fail after valid proof was produced.
Why This Change Was Made
Event reviews now use one workflow run with three trust-separated jobs: the apply job seals an immutable exact-head core artifact, a hardcoded secretless GitHub-hosted job validates that core and produces a separately bound proof augmentation, and a fresh trusted finalizer is the sole publication, acknowledgement, and queue-completion owner. Cleanup changes no longer mutate target-created permissions.
Queued batch review remains on its existing same-job execution path and is the immediate follow-up.
User Impact
Operators keep receiving the same durable review report and optional live-proof media. Valid PASS and FAIL proof is published; a verified cleanup-only failure publishes the core review without proof; mismatched, incomplete, or failed required proof is durably requeued and leaves the finalizer red.
OpenClaw Bay Impact
Bay's durable report and comment contract is unchanged. The finalizer still publishes through the canonical record/comment path, and the exact-head core plus augmentation validation prevents Bay from observing proof from a different head or workflow run.
Documentation Impact
Updated the active
docs/live-proof.mdsecurity, artifact, execution, and publication contract. Release-note context stays in this PR body becauseCHANGELOG.mdis release-owned. The documentation names the remaining batch same-job isolation gap as an immediate follow-up.Evidence
Current Revision
63977ae714d56929737f03d8f26b508af9c6a5c3git diff --check: passedpnpm checkbody reached 3,654 tests: 3,637 passed. The eight local-only failures were one existing macOS tmux pane-capture race and seven target-validation fixtures blocked by a missingpnpm@10.33.0package-mirror entry. No changed workflow contract failed.The positive production delta implements a new security ownership boundary: immutable exact-head core and augmentation schemas, bounded inventories and digests, a secretless execution job, and a trusted sole-publisher finalizer. The old apply-job publisher/ack path and more than 700 lines of obsolete workflow assertions were removed instead of retaining an unreachable compatibility path.
Rank-up Move Disposition
The requested pre-merge exact-event Actions trace cannot exercise this branch topology: GitHub
repository_dispatchalways loads the repository's default-branch workflow, so a run before merge executes the old same-job design. Adding a test-only privileged dispatch route would weaken and widen this security change.The bounded pre-merge substitute is the built workflow contract suite, exact bundle and augmentation validation tests, and the full build/lint gate above. Immediately after merge, rerun ClickClack PRs #171 and #173 exactly once each and verify the default-branch three-job trace, durable exact-head review markers, artifact publication, and no leftover scratch/worktree state.
Local
test/live-proof-review-environment.test.tsreaches the existing tmux fixture but fails on this macOS host because its tmux session exits before pane capture. The isolated workflow and augmentation tests do not depend on that machine-local tmux state; hosted CI remains authoritative.